/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Calendar;

/**
 * <p>Project: javase - If2
 * <p>Powered by webrx On 2021-11-24 15:48:59
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class If2 {
    public static void main(String[] args) {
        var c = Calendar.getInstance();
        String w1 = String.format("%tA", c);
        System.out.println(w1);


        //c.add(Calendar.DATE, 1);
        var wk = c.get(Calendar.DAY_OF_WEEK);
        System.out.println(wk);
        if (wk == 1) {
            System.out.println("星期日");
        } else if (wk == 2) {
            System.out.println("星期一");
        } else if (wk == 3) {
            System.out.println("星期二");
        } else if (wk == 4) {
            System.out.println("星期三");
        } else if (wk == 5) {
            System.out.println("星期四");
        } else if (wk == 6) {
            System.out.println("星期五");
        } else {
            System.out.println("星期六");
        }

        System.out.println("星期" + "日一二三四五六".charAt(wk - 1));
    }
}
